package com.ruoyi.demo.service.impl;

import java.util.List;

import com.ruoyi.demo.domain.UserNoticeInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.demo.mapper.UserNoticeMapper;
import com.ruoyi.demo.domain.UserNotice;
import com.ruoyi.demo.service.IUserNoticeService;

/**
 * 用户通知阅读Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Service
public class UserNoticeServiceImpl implements IUserNoticeService 
{
    @Autowired
    private UserNoticeMapper userNoticeMapper;

    /**
     * 查询用户通知阅读
     * 
     * @param id 用户通知阅读主键
     * @return 用户通知阅读
     */
    @Override
    public UserNotice selectUserNoticeById(Long id)
    {
        return userNoticeMapper.selectUserNoticeById(id);
    }

    /**
     * 查询用户通知阅读列表
     * 
     * @param userNotice 用户通知阅读
     * @return 用户通知阅读
     */
    @Override
    public List<UserNotice> selectUserNoticeList(UserNotice userNotice)
    {
        return userNoticeMapper.selectUserNoticeList(userNotice);
    }

    /**
     * 新增用户通知阅读
     * 
     * @param userNotice 用户通知阅读
     * @return 结果
     */
    @Override
    public int insertUserNotice(UserNotice userNotice)
    {
        return userNoticeMapper.insertUserNotice(userNotice);
    }

    /**
     * 修改用户通知阅读
     * 
     * @param userNotice 用户通知阅读
     * @return 结果
     */
    @Override
    public int updateUserNotice(UserNotice userNotice)
    {
        return userNoticeMapper.updateUserNotice(userNotice);
    }

    /**
     * 批量删除用户通知阅读
     * 
     * @param ids 需要删除的用户通知阅读主键
     * @return 结果
     */
    @Override
    public int deleteUserNoticeByIds(Long[] ids)
    {
        return userNoticeMapper.deleteUserNoticeByIds(ids);
    }

    /**
     * 删除用户通知阅读信息
     * 
     * @param id 用户通知阅读主键
     * @return 结果
     */
    @Override
    public int deleteUserNoticeById(Long id)
    {
        return userNoticeMapper.deleteUserNoticeById(id);
    }

    @Override
    public List<UserNoticeInfo> selectUserNoticeInfoList(Long userId) {
        return userNoticeMapper.selectUserNoticeInfoList(userId);
    }
}
